import fetch from './fetch'
import {fixedApi} from './fixedApi'
const Http = {
  //登录 
  loginIn(param={}) {
    return fetch({
      url:`${fixedApi}/manager/cms/login`,
      method:'post',
      data:param
    })
  },

  loginOut(param={}) {
    return fetch({
      url:`${fixedApi}/manager/cms/logout`,
      method:'post',
      data:param
    })
  },

  

  //管理员列表  /manager/cms/list
  MonitorList(page,size){
    return fetch({
      url:`${fixedApi}/manager/cms/list?pageIndex=${page}&pageSize=${size}`,
      method:'get',
    })
  },
  //添加管理员 
  addMonitor(param={}) {
    return fetch({
      url:`${fixedApi}/manager/cms/insert`,
      method:'post',
      data:param
    })
  },
  //禁用管理员    我子这里
  disableMonitor(id){
    return fetch({
      url:`${fixedApi}/manager/cms/disable/${id}`,
      method:'put',
    })
  },
  //删除管理人员
  deleteMonitor(id){
    return fetch({
      url:`${fixedApi}/manager/cms/delete/${id}`,
      method:'delete',
    })
  },
  //编辑管理员   
  eidtMonitor(param={}) {
    return fetch({
      url:`${fixedApi}/manager/cms/edit`,
      method:'put',
      data:param
    })
  },
  //启用管理员  
  enableMonitor(id){
    return fetch({
      url:`${fixedApi}/manager/cms/enable/${id}`,
      method:'put',
    })
  },

  //获取七牛 Token
  QiniuToken(param={}) {
    return fetch({
      url:`${fixedApi}/common/cms/getQiNiuUpToken`,
      method:'get',
      params:param
    })
  },
  getVideoList(param={}) {
    return fetch({
      url:`${fixedApi}/video/cms/list`,
      method:'get',
      params:param
    })
  },
  addVideo(param={}) {
    return fetch({
      url:`${fixedApi}/video/cms/add`,
      method:'post',
      data:param
    })
  },

  //编辑视频
  editViedo(param={}) {
    return fetch({
      url:`${fixedApi}/video/cms/edit`,
      method:'put',
      data:param
    })
  }, 

  //视频上下线
  upVideo(val,id) {
    return fetch({
      url:`${fixedApi}/video/cms/${id}?status=${val}`,
      method:'put',
      // params:param
    })
  },
   //视频 置顶
   postStickVideo(id){
    return fetch({
      url:`${fixedApi}/video/cms/stick/${id}`,
      method:'put',
      // data:param
    })
  },
   //视频 置顶
   unPostStickVideo(id){
    return fetch({
      url:`${fixedApi}/video/cms/unstick/${id}`,
      method:'put',
      // data:param
    })
  },


  //文章列表
  getArticelList(param={}) {
    return fetch({
      url:`${fixedApi}/article/cms/list`,
      method:'get',
      params:param
    })
  },
  //添加文章
  addAritice(param){
    return fetch({
      url:`${fixedApi}/article/cms/add`,
      method:'post',
      data:param
    })
  },
  //修改文章
  postEditAritice(param){
    return fetch({
      url:`${fixedApi}/article/cms/edit`,
      method:'put',
      data:param
    })
  },
  
  //文章审核 
  upArticle(id,sta){
    return fetch({
      url:`${fixedApi}/article/cms/${id}?status=${sta}`,
      method:'put',
      // data:param
    })
  },
  
  // 删除用户
  deleteAppUser(id){
    return fetch({
      url:`${fixedApi}/user_v2/cms/${id}/delete`,
      method:'delete',
    })
  },
  //禁用用户  wo
  stopUser(id){
    return fetch({
      url:`${fixedApi}/user_v2/cms/${id}/disable`,
      method:'put'
    })
  },
  startUser(id){
    return fetch({
      url:`${fixedApi}/user_v2/cms/${id}/enable`,
      method:'put'
    })
  },

  disableAll(){
    return fetch({
      url:`${fixedApi}/user_v2/cms/disableSpiderUser`,
      method:'put'
    })
  },
  openAll(){
    return fetch({
      url:`${fixedApi}/user_v2/cms/enableSpiderUser`,
      method:'put'
    })
  },

  //总用户
  countUserNumer(param) {
    return fetch({
      url:`${fixedApi}/user_v2/cms/analysis`,
      method:'get',
      params:param
    })
  },

  //文章 置顶  /article/cms/stick/{id}
  postStickAritice(id){
    return fetch({
      url:`${fixedApi}/article/cms/stick/${id}`,
      method:'put',
      // data:param
    })
  },
  //文章取消置顶
  unPostStickAritice(id){
    return fetch({
      url:`${fixedApi}/article/cms/unstick/${id}`,
      method:'put'
    })
  },

  //动态 
  getDynamiclist(param){
    return fetch({
      url:`${fixedApi}/dynamic/cms/list`,
      method:'get',
      params:param
    })
  },
  //动态 审核 
  postEditDynamic(id,sta){
    return fetch({
      url:`${fixedApi}/dynamic/cms/${id}?status=${sta}`,
      method:'put',
      // data:param
    })
  },
  //动态 置顶  /article/cms/stick/{id}
  postStickDynamic(id){
    return fetch({
      url:`${fixedApi}/dynamic/cms/stick/${id}`,
      method:'put',
      // data:param
    })
  },


  //动态取消置顶   
  upStickDynamic(id){
    return fetch({
      url:`${fixedApi}/dynamic/cms/unstick/${id}`,
      method:'put',
      // data:param
    })
  },

  deleteDynamic(param) {
    return fetch({
      url:`${fixedApi}/dynamic/batch/delete`,
      method:'delete',
      data:param
    })
  },

  //问题列表  
  getProblemlist(param){
    return fetch({
      url:`${fixedApi}/problem/cms/list`,
      method:'get',
      params:param
    })
  },

  //推荐
  recomentlist(param) {
    return fetch({
      url:`${fixedApi}/recommend/cms/list`,
      method:'get',
      params:param
    })
  },

  //推荐置顶   /recommend/cms/cancel/{id}
  tickRecomend(id){
    return fetch({
      url:`${fixedApi}/recommend/cms/stick/${id}`,
      method:'put',
      // data:param
    })
  },

  //推荐取消推荐   
  cancelRecomend(id){
    return fetch({
      url:`${fixedApi}/recommend/cms/cancel/${id}`,
      method:'put',
      // data:param
    })
  },

  //回答列表  
  getReplylist(param){
    return fetch({
      url:`${fixedApi}/problem/cms/reply/list`,
      method:'get',
      params:param
    })
  },
  /// 修改回答数量  
  editreplyNumber(param){
    return fetch({
      url:`${fixedApi}/problem/cms/reply/edit`,
      method:'put',
      data:param
    })
  },

  //修改问题数量 /problem/cms/edit
  editprobleNumber(param){
    return fetch({
      url:`${fixedApi}/problem/cms/edit`,
      method:'put',
      data:param
    })
  },
  //审核问题 
  problUpdateStatus(param){
    return fetch({
      url:`${fixedApi}/problem/cms/updateStatus`,
      method:'put',
      data:param
    })
  },


   //审核问回答
   replyUpdateStatus(param){
    return fetch({
      url:`${fixedApi}/problem/cms/reply/updateStatus`,
      method:'put',
      data:param
    })
  },

  //获取C端用户   
  getCuser(param={}) {
    return fetch({
      url:`${fixedApi}/manager/cms/getUserC`,
      method:'get',
      params:param
    })
  },
   //添加C端用户  
   addCuser(param={}){
    return fetch({
      url:`${fixedApi}/manager/cms/addUserC`,
      method:'post',
      data:param
    })
  },
  //c端用户编辑  
  editCuser(param){
    return fetch({
      url:`${fixedApi}/user_v2/cms/edit`,
      method:'put',
      data:param
    })
  },
     
   

  //用户列表  
  getUserlist(param){
    return fetch({
      url:`${fixedApi}/user_v2/cms/list`,
      method:'get',
      params:param
    })
  },




  //第二阶段
  //Banner列表
  getBannerlList(param={}) {
    return fetch({
      url:`${fixedApi}/banner/cms/list`,
      method:'get',
      params:param
    })
  },
  addBanner(param){
    return fetch({
      url:`${fixedApi}/banner/cms/insert`,
      method:'post',
      data:param
    })
  },
  editBanner(param){
    return fetch({
      url:`${fixedApi}/banner/cms/edit`,
      method:'put',
      data:param
    })
  },

  //关键字搜索
  getKeywordlList(param={}) {
    return fetch({
      url:`${fixedApi}/keyword/cms/list`,
      method:'get',
      params:param
    })
  },
  addKeyword(param){
    return fetch({
      url:`${fixedApi}/keyword/cms/insert`,
      method:'post',
      data:param
    })
  },
  editKeyword(param){
    return fetch({
      url:`${fixedApi}/keyword/cms/edit`,
      method:'put',
      data:param
    })
  },
  deleteKeyword(id){
    return fetch({
      url:`${fixedApi}/keyword/cms/delete/${id}`,
      method:'delete'
    })
  },

  //评论管理
  getCommentlist(param){
    return fetch({
      url:`${fixedApi}/userComment/cms/list`,
      method:'get',
      params:param
    })
  },
  editCommentStatus(param){
    return fetch({
      url:`${fixedApi}/userComment/cms/updateStatus/${param.commentId}?status=${param.status}`,
      method:'put'
    })
  },

  //意见反馈  
  getMsglist(param){
    return fetch({
      url:`${fixedApi}/msg/cms/feedbacks`,
      method:'get',
      params:param
    })
  },
 
  //举报列表  
  getReportslist(param){
    return fetch({
      url:`${fixedApi}/msg/cms/reports`,
      method:'get',
      params:param
    })
  },

  //角色列表
  getRolelist(param){
    return fetch({
      url:`${fixedApi}/role/cms/list`,
      method:'get',
      params:param
    })
  },
  getAllRolelist(){
    return fetch({
      url:`${fixedApi}/role/cms/getRoleList`,
      method:'get',
    })
  },
  //添加角色
  addRole(param){
    return fetch({
      url:`${fixedApi}/role/cms/add`,
      method:'post',
      data:param
    })
  },
  //删除角色
  deleteRole(id){
    return fetch({
      url:`${fixedApi}/role/cms/delete/${id}`,
      method:'delete'
    })
  },

  
  //获取所有权限列表    
  getPermissionlist(param){
    return fetch({
      url:`${fixedApi}/permission/cms/list`,
      method:'get',
      params:param
    })
  },
  
  //添加角色权限
  addPermission(param){
    return fetch({
      url:`${fixedApi}/permission/cms/chmod`,
      method:'post',
      data:param
    })
  },
  //医院账号列表  
    
  getIdentifyListlist(param){
    return fetch({
      url:`${fixedApi}/hospitalManager/cms/getIdentifyList`,
      method:'get',
      params:param
    })
  },
  //添加医院账号
  addHospitAdmin(param){
    return fetch({
      url:`${fixedApi}/hospitalManager/cms/addIdentify`,
      method:'post',
      data:param
    })
  }, 
  //禁用医院账号  
  disableAdmin(id){
    return fetch({  
      url:`${fixedApi}/hospitalManager/cms/disable/${id}`,
      method:'put'
    })
  },

  //启用医院账号  
  startAdmin(id){
    return fetch({  
      url:`${fixedApi}/hospitalManager/cms/enable/${id}`,
      method:'put'
    })
  },
  //删除医院信息 
  deleteHospita(id){
    return fetch({
      url:`${fixedApi}/hospitalManager/cms/delete/${id}`,
      method:'delete',
    })
  },
  //医院置顶  
  stickHospital(id){
    return fetch({
      url:`${fixedApi}/hospitalManager/cms/stick/${id}`,
      method:'put',
    })
  },
  //取消医院置顶
  unStickHospital(id){
    return fetch({
      url:`${fixedApi}/hospitalManager/cms/unstick/${id}`,
      method:'put',
    })
  },
  editHospitAdmin(param){   
    return fetch({
      url:`${fixedApi}/hospitalManager/cms/edit`,
      method:'put',
      data:param
    })
  },


   //医院认证列表  
   getCertListlist(param){
    return fetch({
      url:`${fixedApi}/hospitalManager/cms/getCertList`,
      method:'get',
      params:param
    })
  },
  
  //医院审核 列表  
  getHospitalManagerlist(param){
    return fetch({
      url:`${fixedApi}/hospitalManager/cms/getInfoList`,
      method:'get',
      params:param
    })
  },

  //医院审核   
  auditHospital(param){   
    return fetch({
      url:`${fixedApi}/hospitalManager/cms/auditHospital`,
      method:'put',
      data:param
    })
  },

  //医院认证审核提交      
  auditCert(param){   
    return fetch({
      url:`${fixedApi}/hospitalManager/cms/auditCert`,
      method:'put',
      data:param
    })
  },

   //省 市 区 联动
   getAreaList(id){
    return fetch({
      url:`${fixedApi}/hospitalInfo/hms/getAreaList?parentId=${id}`,
      method:'get',
    })
  },


  //医生审核列表    -----------  医生审核列表
  getDoctorAttestList(param){ 
    return fetch({
      url:`${fixedApi}/hospitalManager/cms/doctors`,
      method:'get',
      params:param
    })
  },
  //审核医生   
  AuditDoctor(param) {
    return fetch({
      url:`${fixedApi}/hospitalManager/cms/auditDoctor`,
      method:'put',
      data:param
    })
  },

  //获取所有医生列表  
  getAllHospt(){
    return fetch({
      url:`${fixedApi}/hospitalManager/cms/allHospitals`,
      method:'get',
    })
  },
  //活动管理列表
  getActivityslList(param){
    return fetch({
      url:`${fixedApi}/hospitalActivity/cms/list`,
      method:'get',
      params:param
    })
  },
  // 添加活动 
  addActivity(param) {
    return fetch({
      url:`${fixedApi}/hospitalActivity/cms/insert`,
      method:'post',
      data:param
    })
  },
  editActive(param) {
    return fetch({
      url:`${fixedApi}/hospitalActivity/cms/edit`,
      method:'put',
      data:param
    })
  },
  //删除活动   
  deletActivity(id){
    return fetch({
      url:`${fixedApi}/hospitalActivity/cms/delete/${id}`,
      method:'delete',
    })
  },




  //活动审核列表   
  getActivAuditslList(param){
    return fetch({
      url:`${fixedApi}/hospitalActivity/cms/audit/list`,
      method:'get',
      params:param
    })
  }, 
  //活动审核 
  AuditActive(param) {
    return fetch({
      url:`${fixedApi}/hospitalActivity/cms/audit`,
      method:'put',
      params:param
    })
  },

  //推送列表   
  getPushMsgs(param){
    return fetch({
      url:`${fixedApi}/msg/cms/pushMsgs`,
      method:'get',
      params:param
    })
  }, 
  //添加推送   
  addPush(param) {
    return fetch({
      url:`${fixedApi}/msg/cms/addPush`,
      method:'post',
      data:param
    })
  },  

  //编辑推送
  editPush(param) {
    return fetch({
      url:`${fixedApi}/msg/cms/editPush`,
      method:'put',
      data:param
    })
  },  

  //预约管理列表       /version/cms/add
  getReservelList(param){
    return fetch({
      url:`${fixedApi}/hospitalReserve/cms/list`,
      method:'get',
      params:param
    })
  }, 

  //预约版本列表     /version/cms/add
  getVersionlList(param){
    return fetch({
      url:`${fixedApi}/version/cms/list`,
      method:'get',
      params:param
    })
  }, 
  //编辑版本
  editVersion(param) {
    return fetch({
      url:`${fixedApi}/version/cms/edit  `,
      method:'put',
      data:param
    })
  },  

  //控制版本     
  addVersion(param){
    return fetch({
      url:`${fixedApi}/version/cms/add`,
      method:'post',
      data:param
    })
  }, 
  //标签管理
  getMarklist(param){
    return fetch({
      url:`${fixedApi}/mark/cms/list`,
      method:'get',
      params:param
    })
  }, 
  //添加标签
  addMark(param){
    return fetch({
      url:`${fixedApi}/mark/cms/add`,
      method:'post',
      data:param
    })
  },
  //标签置顶
  stickMark(param) {
    return fetch({
      url:`${fixedApi}/mark/cms/stick?id=${param}`,
      method:'put',
    })
  }, 
  //标签取消置顶   
  unStickMark(param) {
    return fetch({
      url:`${fixedApi}/mark/cms/unstick?id=${param}`,
      method:'put',
    })
  }, 
  //标签删除  
  deleteMark(param) {
    return fetch({
      url:`${fixedApi}/mark/cms/delete?id=${param}`,
      method:'delete',
    })
  },  
  //标签编辑   
  editMark(param) {
    return fetch({
      url:`${fixedApi}/mark/cms/edit`,
      method:'put',
      data:param
    })
  }, 

 
  //商品分类
  commoTypes(param){
    return fetch({
      url:`${fixedApi}/hospitalProduct/cms/types`,
      method:'get',
      params:param
    })
  },
  //商品删除分类 
  deleteType(id){
    return fetch({
      url:`${fixedApi}/hospitalProduct/cms/deleteType/${id}`,
      method:'delete',
    })
  },
  // 商品标签   
  commoTags(param){
    return fetch({
      url:`${fixedApi}/hospitalProduct/cms/tags`,
      method:'get',
      params:param
    })
  },
  // 商品标签   
  // 添加标签 
  commoAddTags(param){
    return fetch({
      url:`${fixedApi}/hospitalProduct/cms/addTag`,
      method:'post',
      data:param
    })
  },
  //标签编辑   
  commoEditTags(param){  
    return fetch({
      url:`${fixedApi}/hospitalProduct/cms/editTag`,
      method:'put',
      data:param
    })
  },
  // 添加分类
  commoAddType(param){
    return fetch({
      url:`${fixedApi}/hospitalProduct/cms/addType`,
      method:'post',
      params:param
    })
  },
  //编辑商品分类  
  commoEditType(param){
    return fetch({
      url:`${fixedApi}/hospitalProduct/cms/editType/${param.id}?name=${param.name}`,
      method:'put',
    })
  },
  //商品删除标签  /hospitalProduct/cms/deleteTag/{id}
  deletType(id){
    return fetch({
      url:`${fixedApi}/hospitalProduct/cms/deleteTag/${id}`,
      method:'delete',
    })
  },
  //商品审核列表   
  getAuditList(param){
    return fetch({
      url:`${fixedApi}/hospitalProduct/cms/auditList`,
      method:'get',
      params:param
    })
  },
  //商品审核   
  commonAudit(param){
    return fetch({
      url:`${fixedApi}/hospitalProduct/cms/audit`,
      method:'put',
      data:param
    })
  },
  //商品列表   
  getCommoList(param){
    return fetch({
      url:`${fixedApi}/hospitalProduct/cms/list`,
      method:'get',
      params:param
    })
  }, 
  //商品 
  commUpdata(param){
    return fetch({
      url:`${fixedApi}/hospitalProduct/cms/updateStatus`,
      method:'put',
      data:param
    })
  },


  //财务流水记录   
  getWaterLIst(param){
    return fetch({
      url:`${fixedApi}/hospitalDayAccount/cms/list`,
      method:'get',
      params:param
    })
  }, 
  //退款列表 
  getRefundList(param){
    return fetch({
      url:`${fixedApi}/hospitalProductOrder/cms/refund/AuditList`,
      method:'get',
      params:param
    })
  }, 
  //退款审核
  upRefundStatus(param){
    return fetch({
      url:`${fixedApi}/hospitalProductOrder/cms/audit/refund`,
      method:'put',
      data:param
    })
  },
  //商家流水  
  getBalanceList(param){
    return fetch({
      url:`${fixedApi}/hospitalDayAccount/cms/balanceList`,
      method:'get',
      params:param
    })
  },
  //购买记录  
  getBuyList(param){
    return fetch({
      url:`${fixedApi}/hospitalProductOrder/cms/list`,
      method:'get',
      params:param
    })
  },
}
export default Http